<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script>
			// var obj1={
			// 	name:"lili",
			// 	age:18,
			// 	job:"ceo"
			// }
			
			// var obj2={
			// 	name:"lisa",
			// 	age:28,
			// 	job:"演员"
			// }
			
			//工厂设计模式：批量创建  函数封装
			
			function createObj(name,age,job){
				return {
					name,
					age,
					job
				}
			}
			
			let obj1=createObj("lili",18,"ceo");
			let obj2=createObj("lisa",28,"演员");
			
			console.log(obj1);
			console.log(obj2);
		</script>
	</body>
</html>
